<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="../res/layui/css/layui.css" media="all">
<script src="../res/layui/layui.js"></script>

</head>
<style type="text/css">
.layui-table td div {
	height: 80px;
}

.layui-table td div img {
	height: 80px;
}
</style>

<body>


	
	<table id="demo" lay-filter="test"></table>

	

	<script>
		var index;
		layui.use([ 'table', 'layer', 'laydate', 'form' ], function() {
			var table = layui.table;
			var layer = layui.layer;
			var form = layui.form;
			var laydate = layui.laydate;

			var $ = layui.$;
			var ids = layui.sessionData("ids");
			//执行渲染
			table.render({
				
				id : "idTest",

				elem : '#demo' //指定原始表格元素选择器（推荐id选择器）
				,
				height : 1000 //容器高度
				,
				page : true,
				url : "/g4/order/selectp",
				where:{orderid:ids["orderid"]},
				cols : [ [ //标题栏
				{
					checkbox : true
				}, {
					//templet: '<div><a href="/detail/{{d.id}}" class="layui-table-link">{{d.title}}</a></div>'

					field : 'picurl',
					title : '图片',
					width : 100,
					templet :'<div><img src="../images/{{d.picurl}}"></div>'
					
				},  {
					field : 'pname',
					title : '商品名字',
					width : 120
				}, {
					field : 'categoryid',
					title : '商品分类id',
					width : 120
				}, {
					field : 'orderid',
					title : '订单id',
					width : 120
				}, {
					field : 'color',
					title : '颜色',
					width : 120
				}, {
					field : 'pIntroduction',
					title : '简介',
					width : 120
				}, {
					field : 'pcanuse',
					title : '上架状态',
					width : 120
				}] ]

			});

		

		});
	</script>

</body>

</html>